package io.afu.baseframework.annotations;




import io.afu.baseframework.annotations.impls.TimeValidatorImpl;
import io.afu.baseframework.constants.ValidateConst;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.ANNOTATION_TYPE,ElementType.FIELD,ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {TimeValidatorImpl.class})
public @interface TimeValidator {
    String message() default ValidateConst.TIMEDATE_FORMAT_NOT_VAILED;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default{};

    String format() default "yyyy-MM-dd hh:mm:ss";

    boolean allowEmpty() default false;

}
